home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tclX-6.4 / help / control / for < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.2 KB  |  19 lines

  1.           for start test next body
  2.                For is a looping command, similar in structure to the C
  3.                for  statement.   The  start,  next, and body arguments
  4.                must be Tcl command strings, and test is an  expression
  5.                string.    The   for  command  first  invokes  the  Tcl
  6.                interpreter  to  execute  start.   Then  it  repeatedly
  7.                evaluates  test as an expression; if the result is non-
  8.                zero it invokes  the  Tcl  interpreter  on  body,  then
  9.                invokes  the  Tcl interpreter on next, then repeats the
  10.                loop.  The command terminates when test evaluates to 0.
  11.                If  a  continue command is invoked within body then any
  12.                remaining commands in the current execution of body are
  13.                skipped;  processing  continues  by  invoking  the  Tcl
  14.                interpreter on next, then evaluating test, and  so  on.
  15.                If a break command is invoked within body or next, then
  16.                the for command will return immediately.  The operation
  17.                of  break and continue are similar to the corresponding
  18.                statements in C.  For returns an empty string.
  19.